On this page

Skip to content

Introduction to EF Core Power Tools

TLDR

  • EF Core Power Tools provides a graphical user interface for reverse engineering, solving the issues of complex native commands and limited customization.
  • Through the efpt.config.json configuration file, it ensures consistency across team development environments.
  • Supports DateOnly and TimeOnly type mapping, preventing SQL Server date/time types from being incorrectly mapped to DateTime.
  • The extension version is highly dependent on EF Core and .NET versions; maintaining multiple projects may require installing different versions of Visual Studio.
  • For support with PostgreSQL or SQLite, you can install the EF Core Power Pack extension.

Introduction to EF Core Power Tools

In Entity Framework Core, the official default approach is Code First. To achieve a Database First workflow, one typically needs to generate code via reverse engineering; however, native commands are cumbersome and lack customization flexibility. EF Core Power Tools is an officially recommended Visual Studio extension that effectively addresses these issues.

Key Features and Advantages

  • UI-based Operations: Provides a graphical interface for executing reverse engineering, reducing the error rate associated with manual command input.
  • Code Customization: Supports advanced code customization via T4 templates or Handlebars.
  • Configuration Management: All settings are stored in efpt.config.json, ensuring team members use identical reverse engineering configurations.
  • Type Mapping Optimization: Supports DateOnly and TimeOnly mapping. By checking "Map DateOnly and TimeOnly" in the advanced settings, you can correctly map SQL Server date and time types, avoiding the misuse of DateTime.

Version Dependency Limitations

When you might encounter this issue: When your development environment maintains multiple projects spanning from .NET Core 3.1 to .NET 8.

Because the EF Core Power Tools version is highly dependent on the Entity Framework Core version, and EF Core is tied to the .NET version, different projects may require different versions of the extension. For example:

  • EF Core Power Tools 2.5.1429: The last version to support Entity Framework Core 3.1; does not support EF Core 8.
  • EF Core Power Tools 2.6.698: The last version to support Entity Framework Core 7.

Recommended approach: If you need to maintain multiple projects with significant version gaps simultaneously, you may need to install different versions of Visual Studio (e.g., the stable version and the Preview version) to install the corresponding extensions separately.

EF Core Power Pack

Solution

When you might encounter this issue: When a developer needs to perform reverse engineering for databases other than SQL Server (such as PostgreSQL or SQLite).

Since EF Core Power Tools natively focuses on SQL Server support, the author developed the EF Core Power Pack extension.

Installation and Usage

After installing the EF Core Power Pack, the system will automatically integrate the following extensions:

  • VisualStudio.Data.Sqlite
  • Npgsql PostgreSQL Integration

Usage instructions:

  1. Perform "Add Connection" in Visual Studio.
  2. Click the "Change(C)" button in the data connection window.
  3. Select the newly added "PostgreSQL" or "SQLite" database type from the list to proceed with subsequent operations.

Change Log

  • 2025-07-07 Initial document creation.